package com.atguigu.xuexiplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("chat_message")
public class ChatMessageEntity implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long fromUserId;
    private Long toUserId; // null 表示群聊
    private String type;   // CHAT/PRIVATE/SYSTEM
    private String content;
    private Integer isRead; // 0/1
    private LocalDateTime createdAt;
}


